/* -----------------------------------------------------------------------------
 * PROJECT    : net.lwf
 * FILE       : WebUser.java
 *
 * HISTORY:
 * Date          Author                        Description
 * ----------------------------------------------------------------------------- 
 * Jan 24, 2011  mycodetalks			       Created
 */

package net.lwf.entity;

import net.lwf.hibernate.entity.User;

public class WebUser {
	
	private User user;
	private UserPreferences preferences;
	private int questionsLimit = 5;

	public WebUser(User _user) {
		this.user = _user;
		if(_user == null) {
			this.user = new User();
		}
	}
	
	public User getUser() {
		return user;
	}
	public UserPreferences getPreferences() {
		if(preferences == null) {
			preferences = new UserPreferences();
		}
		return preferences;
	}
	public void setPreferences(UserPreferences preferences) {
		this.preferences = preferences;
	}
	public int getQuestionsLimit() {
		return questionsLimit;
	}
	public void setQuestionsLimit(int questionsLimit) {
		this.questionsLimit = questionsLimit;
	}

} //WebUser
